<script type="text/javascript">
//<![CDATA[
$('#ex-list a').bind('click', function (e) {
	$('#code textarea').hide();
	$("#" + $(e.target).attr("name")).show();
});
//]]>
</script>

<div >
	<ul class="left" style="width:300px;" id="ex-list">
		<li><a href="javascript:;" name="default">Default</a></li>
		<li><a href="javascript:;" name="title">Title Dialog</a></li>
		<li><a href="javascript:;" name="model">Model Dialog</a></li>
		<li><a href="javascript:;" name="message">Model Message</a></li>
		<li><a href="javascript:;" name="confirmation">Model Confirmation</a></li>
	</ul>

	<div class="left" id="code">
		<div style="width:400px;margin:10px;">
			<textarea rows="3" cols="50" id="default">
EAS_JS.Dialog.open({
	source : $('#demo')
});
</textarea>

			<textarea rows="4" cols="50" id="title" style="display:none;">
EAS_JS.Dialog.open({
	title : 'Demo',
	source : $('#demo')
});
</textarea>

			<textarea rows="4" cols="50" id="model" style="display:none;">
EAS_JS.Dialog.open({
	source : $('#demo'),
	model : true
});
</textarea>

			<textarea rows="5" cols="50" id="message" style="display:none;">
EAS_JS.Dialog.open({
	source : $('#demo'),
	model : true,
	button: true
});
</textarea>

			<textarea rows="11" cols="50" id="confirmation" style="display:none;">
EAS_JS.Dialog.open({
	source : $('#demo'),
	model : true,
	button: {
		ok : function () {alert('click ok');},
		cancel : function () {alert('click cancel');}
	}
});
</textarea>
		<input type="button" value="运行" onclick="eval($('#code textarea:visible').val());" />
		</div>
	</div>
</div>

<div class="clear"></div>
<br />

<div style="border:1px solid #A9D5F4;width:450px;" id="demo">
	<div style="width:450px;margin:10px;">
		<p>jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.</p>
		<form>
			<input value="text input" /><br />
			<input type="checkbox" />checkbox<br />
			<input type="radio" />radio<br />
			<select>
				<option>select</option>
			</select><br /><br />
			<textarea>textarea</textarea><br />
			<input type="button" value="close dialog" onclick="EAS_JS.Dialog.close();" /><br />
		</form>
	</div>
</div>